package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AssCentreFunctionContact generated by hbm2java
 */
@Entity
@Table(name = "AssCentreFunction_Contact", schema = "dbo", catalog = "imgbms")
public class AssCentreFunctionContact implements java.io.Serializable {

	private AssCentreFunctionContactId id;
	private AssCentreFunction assCentreFunction;
	private Contact contact;

	public AssCentreFunctionContact() {
	}

	public AssCentreFunctionContact(AssCentreFunctionContactId id,
			AssCentreFunction assCentreFunction, Contact contact) {
		this.id = id;
		this.assCentreFunction = assCentreFunction;
		this.contact = contact;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "assCentreFunctionId", column = @Column(name = "assCentreFunctionId", nullable = false)),
			@AttributeOverride(name = "contactId", column = @Column(name = "contactId", nullable = false)) })
	public AssCentreFunctionContactId getId() {
		return this.id;
	}

	public void setId(AssCentreFunctionContactId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "assCentreFunctionId", nullable = false, insertable = false, updatable = false)
	public AssCentreFunction getAssCentreFunction() {
		return this.assCentreFunction;
	}

	public void setAssCentreFunction(AssCentreFunction assCentreFunction) {
		this.assCentreFunction = assCentreFunction;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contactId", nullable = false, insertable = false, updatable = false)
	public Contact getContact() {
		return this.contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

}
